-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement block announces in full node #2143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.
twiggy diff reportDifference in .wasm size before and after this pull request.
|
This change doesn't make it to the changelog, since it's not relevant to the wasm node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR implements announcing blocks to other peers when in full mode.
In other words, if node A is connected to B, and B is connected C, when A announces a block to B, B will now announce it to C.
After this PR, it is now possible to launch two smoldot full nodes and have them produce a chain.
The CLI flags I use for that are:
And:
The way it's done is rather simple: as soon as we import a block, we determine which sources to announce the block to by doing
all_sources - sources_that_we_know_know_the_block
. Once announced, we track the fact that this source knows this block.